import { DatePicker, Space, Divider } from "antd";
const { RangePicker } = DatePicker;
const View = () => {
    const onChange = (date, dateString) => {
        console.log(dateString);
    };
    return (
        <>
            <Divider>基本使用</Divider>
            <Space direction='vertical'>
                <DatePicker onChange={onChange} placeholder='选择日期' />
                <DatePicker
                    onChange={onChange}
                    picker='week'
                    placeholder='请选择周'
                />
                <DatePicker
                    onChange={onChange}
                    picker='month'
                    placeholder='选择月'
                />
                <DatePicker
                    onChange={onChange}
                    picker='quarter'
                    placeholder='选择季度'
                />
                <DatePicker
                    onChange={onChange}
                    picker='year'
                    placeholder='选择年'
                />
            </Space>
            <Divider>范围选择器</Divider>
            <Space direction='vertical' size={12}>
                <RangePicker onChange={onChange} />
            </Space>
        </>
    );
};

export default View;
